<?php
/**
 * Created by PhpStorm.
 * User: white
 * Date: 2020/4/29
 * Time: 14:57
 */

namespace app\admin\controller;


class Home extends Base
{
    //后台首页
    public function home()
    {
        $webname = model('common/System') -> field('webname,copyright,icp') -> find();
        $data = [
            'web' => $webname
        ];
        $this -> assign($data);
        return view();
    }

    //退出登录
    public function loginout()
    {
        session(null);
        if (session('?login.id')){
            $this -> error('退出失败！');
        } else {
            $this -> success('退出成功！','admin/index/login');
        }
    }
}